<?php
/**
 * Copyright (c) Sandeep Manne (sandeep.manne@gmail.com) 
 *
 * @author  Sandeep Manne
 * @since   Nov 1, 2008, 3:46:48 PM
 * @version $Id: database.php 17 2009-05-22 17:33:25Z sandeep.manne $
 */

/**
 * @see Zend_Db
 */
require_once 'Zend/Db.php';

$dbConfig = new Zend_Config_Ini(
    $settings->application->path->settings . '/database.ini',
    $settings->application->environment
);

$dbAdapter = Zend_Db::factory($dbConfig->database);

Zend_Registry::set('dbAdapter', $dbAdapter);
Zend_Registry::set('dbConfig', $dbConfig->params);

/**
 * @see Zend_Db_Table
 */
require_once 'Zend/Db/Table.php';
Zend_Db_Table::setDefaultAdapter('dbAdapter');

